﻿﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>CIS*4120 Telecom - Project</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <h2>CIS*4210 - Telecom - Project</h2>
    <h6>By Heston Kan & Justin Wolting</h6>
    <asp:Table runat="server"><asp:TableRow><asp:TableCell VerticalAlign="Top">
        <asp:Label runat="server" Text="Please enter the following values:"></asp:Label>
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td><asp:label ID="lblChannelCapacity" runat="server" Text="Channel Capacity"></asp:label></td>
                <td><asp:TextBox ID="txtChannelCapacity" runat="server" Text="5" TabIndex="1" 
                        Width="33px" ontextchanged="txtChannelCapacity_TextChanged"></asp:TextBox></td>
                <td><asp:RangeValidator ID="rvclass" runat="server" EnableClientScript="true" ControlToValidate="txtChannelCapacity" ErrorMessage="Please enter a number only" MinimumValue="0" MaximumValue="100000" Type="Integer"></asp:RangeValidator></td>
            </tr>
            <tr>
                <td><asp:label ID="lblReserveChan" runat="server" Text="Number of Reserved Channels<br />(Guard Channel)"></asp:label></td>
                <td><asp:TextBox ID="txtReserveChan" runat="server" Text="2" TabIndex="2" Width="33px"></asp:TextBox></td>
                <td><asp:Label ID="txtReserve0" runat="server" text="(0 to run w/o a queue)"></asp:Label><asp:RangeValidator ID="RangeValidator1" runat="server" EnableClientScript="true" ControlToValidate="txtReserveChan" ErrorMessage="Please enter a number only" MinimumValue="0" MaximumValue="100000" Type="Integer"></asp:RangeValidator></td>
            </tr>
            <tr>
                <td><asp:label ID="lblQueueSize" runat="server" Text="Queue size"></asp:label></td>
                <td><asp:TextBox ID="txtQueuesize" runat="server" Text="0" TabIndex="3" Width="33px"></asp:TextBox></td>
                <td><asp:Label ID="txtQueue0" runat="server" text="(0 to run w/o a queue)"></asp:Label><asp:RangeValidator ID="RangeValidator2" runat="server" EnableClientScript="true" ControlToValidate="txtQueuesize" ErrorMessage="Please enter a number only" MinimumValue="0" MaximumValue="100000" Type="Integer"></asp:RangeValidator></td>
            </tr>
            <tr>
                <td><asp:label ID="lblMeanArrival" runat="server" Text="Mean arrival rate for a new call"></asp:label></td>
                <td><asp:TextBox ID="txtMeanArrival" runat="server" Text="3" TabIndex="4" Width="33px"></asp:TextBox></td>
                <td><asp:RangeValidator ID="RangeValidator3" runat="server" EnableClientScript="true" ControlToValidate="txtMeanArrival" ErrorMessage="Please enter a number only" MinimumValue="0" MaximumValue="100000" Type="Integer"></asp:RangeValidator></td>
            </tr>
            <tr>
                <td><asp:label ID="lblMeanCallHold" runat="server" Text="Mean call holding time"></asp:label></td>
                <td><asp:TextBox ID="txtMeanCallHold" runat="server" Text="30" TabIndex="5" Width="33px"></asp:TextBox></td>
                <td><asp:RangeValidator ID="RangeValidator4" runat="server" EnableClientScript="true" ControlToValidate="txtMeanCallHold" ErrorMessage="Please enter a number only" MinimumValue="0" MaximumValue="100000" Type="Integer"></asp:RangeValidator></td>
            </tr>
            <tr>
                <td><asp:label ID="lblMeanCellRes" runat="server" Text="Mean cell residence time"></asp:label></td>
                <td><asp:TextBox ID="txtMeanCellRes" runat="server" Text="30" TabIndex="6" Width="33px"></asp:TextBox></td>
                <td><asp:RangeValidator ID="RangeValidator5" runat="server" EnableClientScript="true" ControlToValidate="txtMeanCellRes" ErrorMessage="Please enter a number only" MinimumValue="0" MaximumValue="100000" Type="Integer"></asp:RangeValidator></td>
            </tr>
            <tr>
                <td><asp:label ID="lblLengthTime" runat="server" Text="Length of simulation"></asp:label></td>
                <td><asp:TextBox ID="txtLengthTime" runat="server" Text="45" TabIndex="7" Width="33px"></asp:TextBox></td>
                <td><asp:RangeValidator ID="RangeValidator6" runat="server" EnableClientScript="true" ControlToValidate="txtLengthTime" ErrorMessage="Please enter a number only" MinimumValue="0" MaximumValue="100000" Type="Integer"></asp:RangeValidator></td>
            </tr>
            <tr>
                <td><asp:Label ID="lblCheck" runat="server" Text="Debuging Info"></asp:Label></td>
                <td><asp:CheckBox id="chkDebug" runat="server" /></td>
            </tr>
        </table>
        </asp:TableCell>
        </asp:TableRow></asp:Table>
        <asp:Button ID="btnGo" runat="server" Text="Run Simulation" OnClick="btnGo_click" TabIndex="1"/><br /><hr />
        <asp:Table runat = "server" CellPadding = "8" CellSpacing = "0">
            <asp:TableRow>
                 <asp:TableCell HorizontalAlign = "Center" VerticalAlign ="Top">
                    <asp:Image ID = "imgPie" runat="server"/>
                 </asp:TableCell>
                  <asp:TableCell HorizontalAlign = "Center" VerticalAlign ="Top" >
                    <asp:Image ID = "imgAvg" runat="server"/>
                 </asp:TableCell>
                 <asp:TableCell HorizontalAlign = "Center" VerticalAlign ="Top">
                    <asp:Image ID = "imgMeter" runat="server"/>
                 </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
        <hr />
        <asp:Table ID="Table1" runat="server" Width="100%" CellPadding="0" CellSpacing="0"><asp:TableRow>
            <asp:TableCell VerticalAlign="Top">
                <asp:Label ID="result" runat="server" EnableViewState ="false" Text=""></asp:Label>
            </asp:TableCell>
            <asp:TableCell VerticalAlign="Top">
                <asp:Label ID="topout" runat="server" EnableViewState = "false" Text=""></asp:Label>
                <asp:Label ID="output" runat="server" EnableViewState = "false" Text=""></asp:Label>
            </asp:TableCell>
        </asp:TableRow></asp:Table>
        <asp:Label id = "gchart" runat="server" EnableViewState = "false" Visible = "false"></asp:Label>
    </div>
    </form>
</body>
</html>
